/*
 * Copyright/Licensing information.
 */

/* inclusion guard */
#ifndef __ECV_FILTER_BINARIZE_H__
#define __ECV_FILTER_BINARIZE_H__

/*
 * Glib includes
 */
#include <glib-object.h>
//#include <gio.h>

/*
 * Potentially, include other headers on which this header depends.
 */

#include "ecv_filter.h"

#include <stdio.h>

/*
 * Type macros.
 */
#define ECV_TYPE_FILTER_BINARIZE                  (ecv_filter_binarize_get_type ())
#define ECV_FILTER_BINARIZE(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), ECV_TYPE_FILTER_BINARIZE, EcvFilter_Binarize))
#define ECV_IS_FILTER_BINARIZE(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ECV_TYPE_FILTER_BINARIZE))
#define ECV_FILTER_BINARIZE_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), ECV_TYPE_FILTER_BINARIZE, EcvFilter_BinarizeClass))
#define ECV_IS_FILTER_BINARIZE_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), ECV_TYPE_FILTER_BINARIZE))
#define ECV_FILTER_BINARIZE_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), ECV_TYPE_FILTER_BINARIZE, EcvFilter_BinarizeClass))

typedef struct _EcvFilter_Binarize        EcvFilter_Binarize;
typedef struct _EcvFilter_BinarizeClass   EcvFilter_BinarizeClass;
typedef struct _EcvFilter_BinarizePrivate EcvFilter_BinarizePrivate;

struct _EcvFilter_Binarize
{
  EcvFilter parent_instance;

  /*< public >*/


  /*< private >*/
  EcvFilter_BinarizePrivate *priv;
};

struct _EcvFilter_BinarizeClass
{
  GObjectClass parent_class;

  /* class members */
  /*< public >*/


  //------------------------------------------------
  /*                   virtual                    */
  void (*create) (EcvFilter_Binarize *self);
  void (*process) (EcvFilter_Binarize *self);
};

/* used by ECV_TYPE_FILTER_BINARIZE */
GType ecv_filter_binarize_get_type (void);

/*
 * Method definitions.
 */

void ecv_filter_binarize_preparetodraw(EcvFilter_Binarize *self, int griden, int fillen, int thr, int fillclustersen);

EcvFilter_Binarize * 
ecv_filter_binarize_new (int width, int height, int bpp, int xdiv, int ydiv);

#endif /* __ECV_FILTER_BINARIZE_H__ */
